//
//  proview.m
//  HAODE
//
//  Created by panquanReabam.com on 15/10/15.
//  Copyright (c) 2015年 reabam.com. All rights reserved.
//

#import "proview.h"

@implementation proview

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
  
        
        _imageView = [[UIImageView alloc]init];
        _imageView.frame = CGRectMake(0, 0, self.width, ScreenWidth/2-15);
      
        [self addSubview:_imageView];

        _buttonView = [UIButton buttonWithType:UIButtonTypeCustom];
        _buttonView.frame = CGRectMake(0, 0, self.width, ScreenWidth/2-15);
        [self addSubview:_buttonView];
    
        UIView *label_backgound = [[UIView alloc]initWithFrame:CGRectMake(0, self.buttonView.bottom, self.width, self.height-self.buttonView.height)];
        [label_backgound setBackgroundColor:[UIColor whiteColor]];
        [self addSubview:label_backgound];
        
        
        
        self.label_name = [[UILabel alloc]initWithFrame:CGRectMake(5, 10 , self.width-20, 15)];
        self.label_name.textColor = [UIColor blackColor];
        self.label_name.font = [UIFont systemFontOfSize:14.5];
        [label_backgound addSubview:self.label_name];
        
        self.label_price = [[UILabel alloc]initWithFrame:CGRectMake(5,   self.label_name.bottom+10, self.width, 16)];
        self.label_price.textColor = hongsecolor;
        self.label_price.font = [UIFont systemFontOfSize:19];
        [label_backgound addSubview:self.label_price];
        
        self.saleQty = [[UILabel alloc]initWithFrame:CGRectMake(self.width-100,self.label_name.bottom+10 , 95, 13)];
        self.saleQty.textColor = zhonghuiColor;
        self.saleQty.textAlignment = NSTextAlignmentRight;
        self.saleQty.font = [UIFont systemFontOfSize:13];
        [label_backgound addSubview:self.saleQty];
        
        
        
    }
    return self;
}

/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect
 {
 // Drawing code
 }
 */

@end
